<script lang="ts" setup>
import { useRoute } from "vue-router";
import { onMounted, reactive, ref } from "vue"
import { requestRecordRecent } from "../../../utils/axiosURL"

const route = useRoute()
const userID = ref<any>(route.query.id)
// 存储播客数据
const savePodcast = reactive<any>([])

// 请求最近播课组件
const requestRecordRecentFn = () => {
  requestRecordRecent(userID).then(({ data }: any) => {
    savePodcast.values = data.list
  }).catch(err => {
    console.log(err)
  })
}


onMounted(() => {
  requestRecordRecentFn()
})
</script>

<template>
  <div v-if="savePodcast.values !== 0" class="noAuthrity">用户暂无播客记录</div>
  <div v-else class="noAuthrity">有数据但是你没写</div>
</template>

<style lang="scss" scoped>
.noAuthrity {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  font-family: $activeTextFont;
  font-size: $font-size-lg2;
}
</style>
